package com.mangguo.tingjian.content.service.impl;

import com.mangguo.tingjian.content.entity.UserSubscription;
import com.mangguo.tingjian.content.mapper.UserSubscriptionMapper;
import com.mangguo.tingjian.content.service.IUserSubscriptionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户订阅的专辑-同步 服务实现类
 * </p>
 *
 * @author auto
 * @since 2019-11-28
 */
@Service
@AllArgsConstructor
public class UserSubscriptionServiceImpl extends ServiceImpl<UserSubscriptionMapper, UserSubscription> implements IUserSubscriptionService {


    private final UserSubscriptionMapper userSubscriptionMapper;

    @Override
    public Long countSubscriptionBetweenDate(Integer start, Integer end, Long albumId) {
        return userSubscriptionMapper.countSubscriptionBetweenDate(start, end, albumId, 1);
    }
}
